import layoutHeaderAside from '@/layout'

const meta = { auth: true }

export default {
    path: '/warning',
    name: 'warning',
    meta,
    redirect: { name: 'warning-exhandling' },
    component: layoutHeaderAside,
    children: (pre => [
        // {
        //     path: 'index',
        //     name: `${pre}index`,
        //     redirect: { name: 'home' },
        //     component: () =>
        //         import ('@/views/warning/home'),
        //     meta: {
        //         ...meta,
        //         title: '首页',
        //         img: require('@/assets/pollution/首页.png'),
        //         isMenu: true
        //     }
        // },
        {
            path: 'monitoring',
            name: `${pre}monitoring`,
            component: { render(c) { return c('router-view') } },
            meta: {
                ...meta,
                title: '监测报警中心',
                img: require('@/assets/public/监测报警中心.png'),
                isMenu: true
            },
            children: [{
                    path: 'exhandling',
                    name: `${pre}exhandling`,
                    component: () =>
                        import ('@/views/warning/Monitoring/indexTwo'),
                    meta: {
                        ...meta,
                        title: '异常处理',
                        isMenu: true
                    }
                },
                /*   {
                      path: 'solvefeedback',
                      name: `${pre}solvefeedback`,
                      component: () => import('@/views/warning/Monitoring/solveFeedback'),
                      meta: {
                          ...meta,
                          title: '处理反馈',
                          isMenu: true
                      }
                  },  */
                {
                    path: 'solvenote',
                    name: `${pre}solvenote`,
                    component: () =>
                        import ('@/views/warning/Monitoring/solve'),
                    meta: {
                        ...meta,
                        title: '处理记录',
                        isMenu: true
                    }
                },
            ]
        },
        {
            path: 'alarm',
            name: `${pre}alarm`,
            component: { render(c) { return c('router-view') } },
            meta: {
                ...meta,
                title: '监测预警中心',
                img: require('@/assets/public/监测报警中心.png'),
                isMenu: true
            },
            children: [{
                path: 'exhandling',
                name: `${pre}alarm-exhandling`,
                component: () =>
                    import ('@/views/warning/alarm/indexTwo'),
                meta: {
                    ...meta,
                    title: '异常处理',
                    isMenu: true
                }
            },
                {
                    path: 'solvenote',
                    name: `${pre}alarm-solvenote`,
                    component: () =>
                        import ('@/views/warning/alarm/solve'),
                    meta: {
                        ...meta,
                        title: '处理记录',
                        isMenu: true
                    }
                },
            ]
        },
        {
            path: 'instrument',
            name: `${pre}instrument`,
            component: { render(c) { return c('router-view') } },
            meta: {
                ...meta,
                title: '仪器故障报备',
                img: require('@/assets/public/仪器故障报备.png'),
                isMenu: true
            },
            children: [
                /*   {
                      path: 'instrument',
                      name: `${pre}instrument`,
                      component: () => import('@/views/warning/Instrument/index'),
                      meta: {
                          ...meta,
                          title: '故障上报',
                          isMenu: true
                      }
                  }, */
                {
                    path: 'troubleshooting',
                    name: `${pre}troubleshooting`,
                    component: () =>
                        import ('@/views/warning/Instrument/Troubleshooting'),
                    meta: {
                        ...meta,
                        title: '故障处置',
                        isMenu: true
                    }
                }
            ]
        },
        {
            path: 'Sparepartstreminder',
            name: `${pre}SparepartstReminder`,
            component: { render(c) { return c('router-view') } },
            meta: {
                ...meta,
                title: '备件更换提醒',
                img: require('@/assets/public/备件更换提醒.png'),
                isMenu: true
            },
            children: [{
                path: 'sparepart',
                name: `${pre}sparepart`,
                component: () =>
                    import ('@/views/warning/SparepartstReminder/index'),
                meta: {
                    ...meta,
                    title: '备件更换提醒',
                    isMenu: true
                }
            }]
        },
        {
            path: 'analoidsreminder',
            name: `${pre}analoidsreminder`,
            component: { render(c) { return c('router-view') } },
            meta: {
                ...meta,
                title: '试剂更换提醒',
                img: require('@/assets/public/试剂更换提醒.png'),
                isMenu: true
            },
            children: [{
                path: 'analoidsreminderindex',
                name: `${pre}analoidsreminderindex`,
                component: () =>
                    import ('@/views/warning/analoidsReminder/index'),
                meta: {
                    ...meta,
                    title: '试剂更换提醒',
                    isMenu: true
                }
            }]
        },
        // {
        //     path: 'message',
        //     name: `${pre}message`,
        //     component: () =>
        //         import ('@/views/warning/message/index'),
        //     meta: {
        //         ...meta,
        //         title: '短信平台',
        //         img: require('@/assets/public/试剂更换提醒.png'),
        //         isMenu: true
        //     },
        //     children: [{
        //         path: 'shortmessage',
        //         name: `${pre}shortmessage`,
        //         component: () =>
        //             import ('@/views/warning/message/index'),
        //         meta: {
        //             ...meta,
        //             title: '短信平台',
        //             isMenu: true
        //         }
        //     }]
        // },
        // {
        //     path: 'bigData',
        //     name: `${pre}bigData`,
        //     component: () =>
        //         import ('@/views/warning/bigData/index'),
        //     meta: {
        //         ...meta,
        //         title: '大数据',
        //         img: require('@/assets/public/数据分析.png'),
        //         isMenu: true
        //     },
        //     children: [{
        //         path: 'bigDataChart',
        //         name: `${pre}bigDataChart`,
        //         component: () =>
        //             import ('@/views/warning/bigData/index'),
        //         meta: {
        //             ...meta,
        //             title: '大数据',
        //             isMenu: true
        //         }
        //     }]
        // },
        // {
        //     path: 'map',
        //     name: `${pre}map`,
        //     component: () => import('@/views/warning/map'),

        //     meta: {
        //         ...meta,
        //         title: '人员签到',
        //         img: require('@/assets/public/监测报警中心.png'),
        //         isMenu: true
        //     },
        // }

    ])('warning-')
}
